﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TweetsTranslate.Models
{
    public class TweetModel
    {
        private const string TwitterWebsiteTemplate = "https://twitter.com/{0}/status/{1}";
        public TweetModel(string pOriginalText)
        {
            this.OriginalText = pOriginalText;
            this.TranslatedText = string.Empty;
        }

        public TweetModel(string pOriginalText, string pTranslatedText) : this(pOriginalText)
        {   
            this.TranslatedText = pTranslatedText;
        }

        public TweetModel(string pOriginalText, string pAuthor, DateTime pDate, string pStatusId)
        {
            this.OriginalText = pOriginalText;
            this.Author = pAuthor;
            this.Date = pDate;
            this.TranslatedText = string.Empty;
            this.Url = String.Format(TwitterWebsiteTemplate, pAuthor, pStatusId);
        }

        public string OriginalText
        {
            get;
            set;
        }

        public string TranslatedText
        {
            get;
            set;
        }

        public DateTime Date
        {
            get;
            set;
        }

        public string Author
        {
            get;
            set;
        }

        public string Url
        {
            get;
            set;
        }
    }
}